﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Could.Service;

public partial class rp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (HiddenField1.Value != "")
            {

            }
            else
            {
                if (Request.QueryString["c"] != null)
                {
                    HiddenField1.Value = Request.QueryString["c"];
                }
            }
        }
        if (HiddenField1.Value != "")
        {
            string Passwd = Request.Form["Passwd"];
            string PassAgain = Request.Form["PasswdAgain"];
            if ( Passwd != null && PassAgain != null)
               if (Passwd == PassAgain)
                {
                    ServiceLib sl = new ServiceLib();
                    if (sl.ChangePasswd(HiddenField1.Value, PassAgain))
                    {
                        Label1.Text = "成功更改密码";
                    }else{
                        Label1.Text = "激活失效，请重新找回密码!";
                    }
                    ;
                }
                else
                {
                    Label1.Text = "二次输入的密码不相符!";
                }
        }

    }
}
